home *** CD-ROM | disk | FTP | other *** search
- global gDBTextVarList
-
- on TextCopy
- MyObj = getaProp(gDBTextVarList, GetObjProp())
- xMember = the member of sprite getaProp(GetSpriteList(MyObj), #ts)
- member("texthold f").text = char the selStart to the selEnd of the text of field xMember
- copyToClipBoard(member("texthold f"))
- end
-
- on EvalKeyPressed
- if the commandDown then
- case the key of
- "c":
- end case
- else
- beep()
- end if
- end
-
- on SetFieldProps xMember
- set the textFont of member xMember to GetFont()
- set the textSize of member xMember to 12
- member(xMember).editable = 1
- end
-
- on GetFont
- if the machineType = 256 then
- xFont = "arial"
- else
- xFont = "helvetica"
- end if
- return xFont
- end
-
- on GetRectHeight xRect
- return getAt(xRect, 4) - getAt(xRect, 2)
- end
-
- on RemoveBlankLines xText
- ReturnString = xText
- LineMax = the number of lines in ReturnString
- repeat with rc = LineMax down to 1
- LineText = line rc of ReturnString
- if (LineText = EMPTY) or (LineText = " ") then
- delete line rc of ReturnString
- LineMax = the number of lines in ReturnString
- end if
- end repeat
- return ReturnString
- end
-
- on ParseLineBreak xText
- repeat while xText contains "^"
- Pos = offset("^", xText)
- put RETURN into char Pos of xText
- end repeat
- return xText
- end
-
- on RectToLoc xRect
- l = getAt(xRect, 1)
- t = getAt(xRect, 2)
- R = getAt(xRect, 3)
- b = getAt(xRect, 4)
- xPoint = point(((R - l) / 2) + l, ((b - t) / 2) + t)
- return xPoint
- end
-
- on CreateLookUpList paramList
- list = []
- repeat with rc in paramList
- append(list, getPos(paramList, rc))
- end repeat
- return list
- end
-
- on LineItemCount xText
- storeDelimiter = the itemDelimiter
- the itemDelimiter = TAB
- xNumber = the number of items in xText
- the itemDelimiter = storeDelimiter
- return xNumber
- end
-
- on BlankLine xText
- return (xText = EMPTY) or (xText = " ")
- end
-
- on RemoveSpaces xText
- ReturnString = xText
- repeat while ReturnString contains " "
- SpaceLoc = offset(" ", ReturnString)
- delete char SpaceLoc of ReturnString
- end repeat
- return ReturnString
- end
-
- on DelBorderSpaces xText
- ReturnString = xText
- repeat while char 1 of ReturnString = " "
- delete char 1 of ReturnString
- end repeat
- repeat while char length(ReturnString) of ReturnString = " "
- delete char length(ReturnString) of ReturnString
- end repeat
- return ReturnString
- end
-